package com.File文件;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class IO流 {
    public static void main(String[] args) throws IOException {
        //输入流
        FileInputStream fis=new FileInputStream("D:\\黑马视频\\file\\father\\nihao\\index.txt");
        //读取
        byte[] bys=new byte[4096];
        while((fis.read(bys))!=-1){
            System.out.println(new String(bys,0,bys.length));
        }
        //关闭资源
        fis.close();
    }
}
